<%@ page import="support.*, java.util.*, java.sql.*, javax.sql.*" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> 
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>

<jsp:include page="header.jsp" />

<%
	HashMap myApp = (HashMap)session.getAttribute("application");
%>

	<div id="content" class="expand">
		<h2>Graduate Application</h2>
		
		<p>Your current status: <b><%= myApp.get("status") %></b></p>
		
		<p>Your Application:</p>
		
		<p><%= myApp.get("firstName") + " " +  myApp.get("lastName") %></p>
		
		<p>Citizenship: <%= myApp.get("citizenship") %> <br/>
		Residency: <%= myApp.get("residency") %></p>
		
		<p>
		<%
		if (myApp.get("residency").equals("United States")) {
			out.print(myApp.get("address") + ", " + myApp.get("city") + ", " + myApp.get("state") + " <br/>");
			out.print(myApp.get("zipCode") + ", (" + myApp.get("areaCode") + ") " + myApp.get("phone"));
		}
		else {
			out.print(myApp.get("address") + ", " + myApp.get("city") + " " + myApp.get("zipCode") + " <br/>");
			out.print("+" + myApp.get("countryCode") + " " + myApp.get("phone"));
		}
		%>
		</p>
		
		<p>Entered Degrees</p>
				
		<%
		// Write out entered degrees
		Vector degreeList = (Vector)myApp.get("degrees");
		for (int i = 0; i < degreeList.size(); i++) {
			out.print("<p>");
			out.print("Degree " + (i + 1) + " <br/>");
			HashMap currentDegree = (HashMap)degreeList.get(i);
			
			out.print("University: " + currentDegree.get("university") + " <br/>");
			out.print("Discipline: " + currentDegree.get("discipline") + " <br/>");
			out.print("Graduation: " + currentDegree.get("month") + "/" + currentDegree.get("year") + " <br/>");
			out.print("GPA: " + currentDegree.get("gpa") + " <br/>");
			out.print("Title: " + currentDegree.get("title") + " <br/>");
			
			out.print("</p>");
		}
		%>
		
		<p>Specialization: <%= myApp.get("specialization") %></p>
		
	</div>

</body>
</html>